\(\int \log ^2(a+b x+c x) \, dx\) [68]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 49 \[ \int \log ^2(a+b x+c x) \, dx=2 x-\frac {2 (a+(b+c) x) \log (a+(b+c) x)}{b+c}+\frac {(a+(b+c) x) \log ^2(a+(b+c) x)}{b+c} \]

[Out]

2*x-2*(a+(b+c)*x)*ln(a+(b+c)*x)/(b+c)+(a+(b+c)*x)*ln(a+(b+c)*x)^2/(b+c)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {2494, 2436, 2333, 2332} \[ \int \log ^2(a+b x+c x) \, dx=\frac {(a+x (b+c)) \log ^2(a+x (b+c))}{b+c}-\frac {2 (a+x (b+c)) \log (a+x (b+c))}{b+c}+2 x \]

[In]

Int[Log[a + b*x + c*x]^2,x]

[Out]

2*x - (2*(a + (b + c)*x)*Log[a + (b + c)*x])/(b + c) + ((a + (b + c)*x)*Log[a + (b + c)*x]^2)/(b + c)

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2333

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2436

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2494

Int[((a_.) + Log[(c_.)*(v_)^(n_.)]*(b_.))^(p_.)*(u_.), x_Symbol] :> Int[u*(a + b*Log[c*ExpandToSum[v, x]^n])^p
, x] /; FreeQ[{a, b, c, n, p}, x] && LinearQ[v, x] &&  !LinearMatchQ[v, x] &&  !(EqQ[n, 1] && MatchQ[c*v, (e_.
)*((f_) + (g_.)*x) /; FreeQ[{e, f, g}, x]])

Rubi steps \begin{align*} \text {integral}& = \int \log ^2(a+(b+c) x) \, dx \\ & = \frac {\text {Subst}\left (\int \log ^2(x) \, dx,x,a+(b+c) x\right )}{b+c} \\ & = \frac {(a+(b+c) x) \log ^2(a+(b+c) x)}{b+c}-\frac {2 \text {Subst}(\int \log (x) \, dx,x,a+(b+c) x)}{b+c} \\ & = 2 x-\frac {2 (a+(b+c) x) \log (a+(b+c) x)}{b+c}+\frac {(a+(b+c) x) \log ^2(a+(b+c) x)}{b+c} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.98 \[ \int \log ^2(a+b x+c x) \, dx=\frac {2 (b+c) x-2 (a+(b+c) x) \log (a+(b+c) x)+(a+(b+c) x) \log ^2(a+(b+c) x)}{b+c} \]

[In]

Integrate[Log[a + b*x + c*x]^2,x]

[Out]

(2*(b + c)*x - 2*(a + (b + c)*x)*Log[a + (b + c)*x] + (a + (b + c)*x)*Log[a + (b + c)*x]^2)/(b + c)

Maple [A] (verified)

Time = 0.14 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.06

method result size
derivativedivides \(\frac {\ln \left (a +\left (b +c \right ) x \right )^{2} \left (a +\left (b +c \right ) x \right )-2 \left (a +\left (b +c \right ) x \right ) \ln \left (a +\left (b +c \right ) x \right )+2 a +2 \left (b +c \right ) x}{b +c}\) \(52\)
default \(\frac {\ln \left (a +\left (b +c \right ) x \right )^{2} \left (a +\left (b +c \right ) x \right )-2 \left (a +\left (b +c \right ) x \right ) \ln \left (a +\left (b +c \right ) x \right )+2 a +2 \left (b +c \right ) x}{b +c}\) \(52\)
norman \(x \ln \left (b x +x c +a \right )^{2}+\frac {a \ln \left (b x +x c +a \right )^{2}}{b +c}+2 x -2 x \ln \left (b x +x c +a \right )-\frac {2 a \ln \left (b x +x c +a \right )}{b +c}\) \(65\)
risch \(\frac {\ln \left (b x +x c +a \right )^{2} \left (b x +x c +a \right )}{b +c}-2 x \ln \left (b x +x c +a \right )-\frac {2 a \ln \left (a +\left (b +c \right ) x \right )}{b +c}+\frac {2 b x}{b +c}+\frac {2 x c}{b +c}\) \(73\)
parallelrisch \(\frac {x \ln \left (b x +x c +a \right )^{2} a b +x \ln \left (b x +x c +a \right )^{2} a c -2 x \ln \left (b x +x c +a \right ) a b -2 x \ln \left (b x +x c +a \right ) a c +\ln \left (b x +x c +a \right )^{2} a^{2}+2 a b x +2 x c a -2 \ln \left (b x +x c +a \right ) a^{2}}{a \left (b +c \right )}\) \(108\)

[In]

int(ln(b*x+c*x+a)^2,x,method=_RETURNVERBOSE)

[Out]

1/(b+c)*(ln(a+(b+c)*x)^2*(a+(b+c)*x)-2*(a+(b+c)*x)*ln(a+(b+c)*x)+2*a+2*(b+c)*x)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.98 \[ \int \log ^2(a+b x+c x) \, dx=\frac {{\left ({\left (b + c\right )} x + a\right )} \log \left ({\left (b + c\right )} x + a\right )^{2} + 2 \, {\left (b + c\right )} x - 2 \, {\left ({\left (b + c\right )} x + a\right )} \log \left ({\left (b + c\right )} x + a\right )}{b + c} \]

[In]

integrate(log(b*x+c*x+a)^2,x, algorithm="fricas")

[Out]

(((b + c)*x + a)*log((b + c)*x + a)^2 + 2*(b + c)*x - 2*((b + c)*x + a)*log((b + c)*x + a))/(b + c)

Sympy [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.29 \[ \int \log ^2(a+b x+c x) \, dx=- 2 x \log {\left (a + b x + c x \right )} + \left (2 b + 2 c\right ) \left (- \frac {a \log {\left (a + x \left (b + c\right ) \right )}}{\left (b + c\right )^{2}} + \frac {x}{b + c}\right ) + \frac {\left (a + b x + c x\right ) \log {\left (a + b x + c x \right )}^{2}}{b + c} \]

[In]

integrate(ln(b*x+c*x+a)**2,x)

[Out]

-2*x*log(a + b*x + c*x) + (2*b + 2*c)*(-a*log(a + x*(b + c))/(b + c)**2 + x/(b + c)) + (a + b*x + c*x)*log(a +
 b*x + c*x)**2/(b + c)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.78 \[ \int \log ^2(a+b x+c x) \, dx=\frac {{\left (b x + c x + a\right )} {\left (\log \left (b x + c x + a\right )^{2} - 2 \, \log \left (b x + c x + a\right ) + 2\right )}}{b + c} \]

[In]

integrate(log(b*x+c*x+a)^2,x, algorithm="maxima")

[Out]

(b*x + c*x + a)*(log(b*x + c*x + a)^2 - 2*log(b*x + c*x + a) + 2)/(b + c)

Giac [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.33 \[ \int \log ^2(a+b x+c x) \, dx=\frac {{\left (b x + c x + a\right )} \log \left (b x + c x + a\right )^{2}}{b + c} - \frac {2 \, {\left (b x + c x + a\right )} \log \left (b x + c x + a\right )}{b + c} + \frac {2 \, {\left (b x + c x + a\right )}}{b + c} \]

[In]

integrate(log(b*x+c*x+a)^2,x, algorithm="giac")

[Out]

(b*x + c*x + a)*log(b*x + c*x + a)^2/(b + c) - 2*(b*x + c*x + a)*log(b*x + c*x + a)/(b + c) + 2*(b*x + c*x + a
)/(b + c)

Mupad [B] (verification not implemented)

Time = 1.49 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.92 \[ \int \log ^2(a+b x+c x) \, dx=\frac {2\,b\,x+2\,c\,x-2\,a\,\ln \left (a+b\,x+c\,x\right )+a\,{\ln \left (a+b\,x+c\,x\right )}^2+b\,x\,{\ln \left (a+b\,x+c\,x\right )}^2+c\,x\,{\ln \left (a+b\,x+c\,x\right )}^2-2\,b\,x\,\ln \left (a+b\,x+c\,x\right )-2\,c\,x\,\ln \left (a+b\,x+c\,x\right )}{b+c} \]

[In]

int(log(a + b*x + c*x)^2,x)

[Out]

(2*b*x + 2*c*x - 2*a*log(a + b*x + c*x) + a*log(a + b*x + c*x)^2 + b*x*log(a + b*x + c*x)^2 + c*x*log(a + b*x
+ c*x)^2 - 2*b*x*log(a + b*x + c*x) - 2*c*x*log(a + b*x + c*x))/(b + c)